#light

namespace FML
  module Monoid = begin
    type Monoid<'a> =
      interface
        abstract member Append : 'a -> 'a -> 'a
        abstract member Empty : unit -> 'a
      end
    type ListMonoid<'a> =
      class
        interface Monoid<'a list>
        new : unit -> ListMonoid<'a>
      end
  end
  module IdentityM = begin
    type IdentityMonad =
      interface
        abstract member Bind : 'a * ('a -> 'b) -> 'b
        abstract member Delay : f:(unit -> 'a) -> 'a
        abstract member Join : m:'a -> 'a
        abstract member Let : 'a * ('a -> 'b) -> 'b
        abstract member Map : f:('a -> 'b) * 'a -> 'b
        abstract member Return : 'a -> 'a
      end
    type IdentityBuilder =
      class
        interface IdentityMonad
        new : unit -> IdentityBuilder
      end
    val identityM : IdentityMonad
  end
  module OptionM = begin
    type IOptionMonad =
      interface
        abstract member Bind : 'a option * ('a -> 'b option) -> 'b option
        abstract member Delay : f:(unit -> 'a option) -> 'a option
        abstract member Join : 'a option option -> 'a option
        abstract member Let : 'a option * ('a -> 'b option) -> 'b option
        abstract member Map : ('a -> 'b) * 'a option -> 'b option
        abstract member MapM : ('a -> 'b option) * 'a list -> 'b list option
        abstract member MapM_ : ('a -> 'b option) * 'a list -> unit option
        abstract member Return : 'a -> 'a option
        abstract member Sequence : 'a option list -> 'a list option
        abstract member Sequence_ : 'a option list -> unit option
        abstract member Zero : unit -> 'a option
      end
    type OptionBuilder =
      class
        interface IOptionMonad
        new : unit -> OptionBuilder
      end
    val optionM : IOptionMonad
  end
  module ListM = begin
    type IListMonad =
      interface
        abstract member Bind : 'a list * ('a -> 'b list) -> 'b list
        abstract member Delay : f:(unit -> 'a list) -> 'a list
        abstract member Join : 'a list list -> 'a list
        abstract member Let : 'a list * ('a -> 'b list) -> 'b list
        abstract member Map : ('a -> 'b) * 'a list -> 'b list
        abstract member Return : 'a -> 'a list
        abstract member Zero : unit -> 'a list
      end
    type ListBuilder =
      class
        interface IListMonad
        new : unit -> ListBuilder
      end
    val listM : IListMonad
  end
  module StateM = begin
    type State<'a,'state> = | State of ('state -> 'a * 'state)
    type IStateMonad =
      interface
        abstract member
          Bind : State<'a,'state> * ('a -> State<'b,'state>) -> State<'b,'state>
        abstract member Delay : f:(unit -> State<'a,'state>) -> State<'a,'state>
        abstract member Join : State<State<'a,'b>,'b> -> State<'a,'b>
        abstract member Let : 'a * ('a -> State<'b,'state>) -> State<'b,'state>
        abstract member Map : ('a -> 'b) * State<'a,'c> -> State<'b,'c>
        abstract member
          MapM : ('a -> State<'b,'state>) * 'a list -> State<'b list,'state>
        abstract member
          MapM_ : ('a -> State<'b,'state>) * 'a list -> State<unit,'state>
        abstract member Return : 'a -> State<'a,'state>
        abstract member
          Sequence : State<'a,'state> list -> State<'a list,'state>
        abstract member Sequence_ : State<'a,'state> list -> State<unit,'state>
      end
    val run : State<'a,'b> -> 'b -> 'a * 'b
    type StateBuilder =
      class
        interface IStateMonad
        new : unit -> StateBuilder
      end
    val stateM : IStateMonad
    val get : State<'a,'a>
    val set : 'a -> State<unit,'a>
    val modify : ('a -> 'a) -> State<unit,'a>
    val retreiveState : ('a * 'b -> 'b)
    val mapState : ('a * 's -> 'b * 's) -> State<'a,'s> -> State<'b,'s>
    val withState : ('s -> 's) -> State<'a,'s> -> State<'a,'s>
  end
  module WriterM = begin
    type Writer<'a,'s> = | Writer of ('a * 's)
    type IWriterMonad<'s> =
      interface
        abstract member
          Bind : Writer<'a,'s> * ('a -> Writer<'b,'s>) -> Writer<'b,'s>
        abstract member Delay : f:(unit -> Writer<'a,'s>) -> Writer<'a,'s>
        abstract member Fmap : ('a -> 'b) -> (Writer<'a,'c> -> Writer<'b,'c>)
        abstract member Let : 'a * ('a -> Writer<'b,'s>) -> Writer<'b,'s>
        abstract member Listen : Writer<'a,'b> -> Writer<('a * 'b),'b>
        abstract member
          MapM : ('a -> Writer<'b,'s>) * 'a list -> Writer<'b list,'s>
        abstract member
          MapM_ : ('a -> Writer<'b,'s>) * 'a list -> Writer<unit,'s>
        abstract member
          MapWriter : ('a * 'b -> 'c * 'd) -> (Writer<'a,'b> -> Writer<'c,'d>)
        abstract member Pass : Writer<('a * ('b -> 'c)),'b> -> Writer<'a,'c>
        abstract member Return : 'a -> Writer<'a,'s>
        abstract member RunM : Writer<'a,'b> -> 'a * 'b
        abstract member Sequence : Writer<'a,'s> list -> Writer<'a list,'s>
        abstract member Sequence_ : Writer<'a,'s> list -> Writer<unit,'s>
        abstract member Tell : 'a -> Writer<unit,'a>
        abstract member Write : 'a -> Writer<unit,'a>
      end
    type WriterBuilder<'s> =
      class
        interface IWriterMonad<'s>
        new : monoid:Monoid.Monoid<'s> -> WriterBuilder<'s>
      end
    val writerM : Monoid.Monoid<'s> -> IWriterMonad<'s>
  end
  module ReaderM = begin
    type Reader<'a,'env> =
      | ReaderT of ('env -> 'a)
      with
        static member Ask : unit -> Reader<'a,'a>
        static member Fmap : f:('a0 -> 'b) -> (Reader<'a0,'c> -> Reader<'b,'c>)
        static member Local : f:('a0 -> 'b) -> (Reader<'c,'b> -> Reader<'c,'a0>)
        static member RunM : m:Reader<'a0,'b> -> ('b -> 'a0)
      end
    type IReaderMonad =
      interface
        abstract member Asks : ('a -> 'b) -> Reader<'b,'a>
        abstract member
          Bind : Reader<'a,'s> * ('a -> Reader<'b,'s>) -> Reader<'b,'s>
        abstract member Delay : f:(unit -> Reader<'a,'s>) -> Reader<'a,'s>
        abstract member Let : 'a * ('a -> Reader<'b,'s>) -> Reader<'b,'s>
        abstract member
          MapM : ('a -> Reader<'b,'s>) * 'a list -> Reader<'b list,'s>
        abstract member
          MapM_ : ('a -> Reader<'b,'s>) * 'a list -> Reader<unit,'s>
        abstract member Return : 'a -> Reader<'a,'s>
        abstract member Sequence : Reader<'a,'s> list -> Reader<'a list,'s>
        abstract member Sequence_ : Reader<'a,'s> list -> Reader<unit,'s>
      end
    type ReaderBuilder =
      class
        interface IReaderMonad
        new : unit -> ReaderBuilder
      end
    val readerM : IReaderMonad
  end
  module ErrorM = begin
    type Either<'l,'r> =
      | Right of 'r
      | Left of 'l
    type IErrorMonad =
      interface
        abstract member
          Bind : Either<'l,'r1> * ('r1 -> Either<'l,'r2>) -> Either<'l,'r2>
        abstract member Combine : Either<'l,'r> * Either<'l,'r> -> Either<'l,'r>
        abstract member Delay : f:(unit -> Either<'l,'r>) -> Either<'l,'r>
        abstract member Let : 'r1 * ('r1 -> Either<'l,'r2>) -> Either<'l,'r2>
        abstract member Map : ('a -> 'b) * Either<'c,'a> -> Either<'c,'b>
        abstract member
          MapM : ('a -> Either<'l,'b>) * 'a list -> Either<'l,'b list>
        abstract member
          MapM_ : ('a -> Either<'l,'b>) * 'a list -> Either<'l,unit>
        abstract member Return : 'r -> Either<'l,'r>
        abstract member Sequence : Either<'l,'r> list -> Either<'l,'r list>
        abstract member Sequence_ : Either<'l,'r> list -> Either<'l,unit>
        abstract member Zero : unit -> Either<'l,unit>
      end
    val throwError : 'a -> Either<'a,'b>
    val catch : Either<'a,'b> -> ('a -> Either<'a,'b>) -> Either<'a,'b>
    type ErrorBuilder =
      class
        interface IErrorMonad
        new : unit -> ErrorBuilder
      end
    val errorM : IErrorMonad
  end
  module ContM = begin
    type Cont<'a,'r> = | Cont of (('a -> 'r) -> 'r)
    val run : Cont<'a,'b> -> ('a -> 'b) -> 'b
    type IContinuationMonad =
      interface
        abstract member Bind : Cont<'a,'b> * ('a -> Cont<'c,'b>) -> Cont<'c,'b>
        abstract member Delay : f:(unit -> Cont<'a,'b>) -> Cont<'a,'b>
        abstract member Let : 'a * ('a -> Cont<'a,'b>) -> Cont<'a,'b>
        abstract member Return : 'a -> Cont<'a,'b>
      end
    val mapCont : ('a -> 'a) -> Cont<'b,'a> -> Cont<'b,'a>
    val withCont : (('a -> 'b) -> 'c -> 'b) -> Cont<'c,'b> -> Cont<'a,'b>
    val fmap : ('a -> 'b) -> Cont<'a,'c> -> Cont<'b,'c>
    val callCC : (('a -> Cont<'b,'c>) -> Cont<'a,'c>) -> Cont<'a,'c>
    type ContinuationBuilder =
      class
        interface IContinuationMonad
        new : unit -> ContinuationBuilder
      end
    val contM : IContinuationMonad
  end

namespace FML
  module ListT = begin
    module Option = begin
      type IListOptionTrans =
        interface
          abstract member
            Bind : 'a list option * ('a -> 'b list option) -> 'b list option
          abstract member Delay : f:(unit -> 'a list option) -> 'a list option
          abstract member Let : 'a * ('a -> 'b list option) -> 'b list option
          abstract member Lift : 'a option -> 'a list option
          abstract member Return : 'a -> 'a list option
          abstract member Zero : unit -> 'a list option
        end
      type ListOptionBuilder =
        class
          interface IListOptionTrans
          new : optionM:OptionM.IOptionMonad -> ListOptionBuilder
        end
      val listOptionT : IListOptionTrans
    end
    module State = begin
      type IListStateTrans =
        interface
          abstract member
            Bind : a:StateM.State<'a list,'state> *
                   f:('a -> StateM.State<'b list,'state>) ->
                     StateM.State<'b list,'state>
          abstract member Delay : f:(unit -> 'a) -> 'a
          abstract member Get : unit -> StateM.State<'a list,'a>
          abstract member
            Let : a:'a * f:('a -> StateM.State<'b list,'state>) ->
                    StateM.State<'b list,'state>
          abstract member
            Lift : a:StateM.State<'a,'state> -> StateM.State<'a list,'state>
          abstract member Return : a:'a -> StateM.State<'a list,'state>
          abstract member Set : 'a -> StateM.State<unit list,'a>
        end
      type ListStateBuilder =
        class
          interface IListStateTrans
          new : stateM:StateM.IStateMonad -> ListStateBuilder
        end
      val listStateT : IListStateTrans
    end
    module Writer = begin
      type IListWriterTrans<'s> =
        interface
          abstract member
            Bind : a:WriterM.Writer<'a list,'s> *
                   f:('a -> WriterM.Writer<'b list,'s>) ->
                     WriterM.Writer<'b list,'s>
          abstract member Delay : f:(unit -> 'a) -> 'a
          abstract member
            Let : a:'a * f:('a -> WriterM.Writer<'b list,'s>) ->
                    WriterM.Writer<'b list,'s>
          abstract member
            Lift : a:WriterM.Writer<'a,'s> -> WriterM.Writer<'a list,'s>
          abstract member
            Listen : WriterM.Writer<'a,'b> -> WriterM.Writer<('a * 'b),'b>
          abstract member
            Pass : WriterM.Writer<('a * ('b -> 'c)),'b> -> WriterM.Writer<'a,'c>
          abstract member Return : a:'a -> WriterM.Writer<'a list,'s>
          abstract member Tell : 'a -> WriterM.Writer<unit,'a>
        end
      type ListWriterBuilder<'s> =
        class
          interface IListWriterTrans<'s>
          new : writerM:WriterM.IWriterMonad<'s> -> ListWriterBuilder<'s>
        end
    end
    module Reader = begin
      type IListReaderTrans =
        interface
          abstract member Ask : unit -> ReaderM.Reader<'a list,'a>
          abstract member
            Bind : a:ReaderM.Reader<'a list,'env> *
                   f:('a -> ReaderM.Reader<'b list,'env>) ->
                     ReaderM.Reader<'b list,'env>
          abstract member Delay : f:(unit -> 'a) -> 'a
          abstract member
            Let : a:'a * f:('a -> ReaderM.Reader<'b list,'env>) ->
                    ReaderM.Reader<'b list,'env>
          abstract member
            Lift : a:ReaderM.Reader<'a,'env> -> ReaderM.Reader<'a list,'env>
          abstract member
            Local : ('a -> 'b) ->
                      (ReaderM.Reader<'c,'b> -> ReaderM.Reader<'c,'a>)
          abstract member Return : a:'a -> ReaderM.Reader<'a list,'env>
        end
      type ListReaderBuilder =
        class
          interface IListReaderTrans
          new : readerM:ReaderM.IReaderMonad -> ListReaderBuilder
        end
      val listReaderT : IListReaderTrans
    end
    module Error = begin
      type IListErrorTrans =
        interface
          abstract member
            Bind : ErrorM.Either<'l,'a list> * ('a -> ErrorM.Either<'l,'b list>) ->
                     ErrorM.Either<'l,'b list>
          abstract member
            Delay : f:(unit -> ErrorM.Either<'l,'a list>) ->
                      ErrorM.Either<'l,'a list>
          abstract member
            Let : 'a * ('a -> ErrorM.Either<'l,'b list>) ->
                    ErrorM.Either<'l,'b list>
          abstract member
            Lift : ErrorM.Either<'l,'a> -> ErrorM.Either<'l,'a list>
          abstract member Return : 'a -> ErrorM.Either<'l,'a list>
          abstract member Zero : unit -> ErrorM.Either<'l,unit>
        end
      type ListErrorBuilder =
        class
          interface IListErrorTrans
          new : errorM:ErrorM.IErrorMonad -> ListErrorBuilder
        end
      val listErrorT : IListErrorTrans
    end
  end

namespace FML
  module OptionT = begin
    module List = begin
      type IOptionListMonad =
        interface
          abstract member
            Bind : 'a option list * ('a -> 'b option list) -> 'b option list
          abstract member Delay : f:(unit -> 'a option list) -> 'a option list
          abstract member Let : 'a * ('a -> 'b option list) -> 'b option list
          abstract member Lift : 'a list -> 'a option list
          abstract member Return : 'a -> 'a option list
          abstract member Zero : unit -> 'a option list
        end
      type OptionListBuilder =
        class
          interface IOptionListMonad
          new : listM:ListM.IListMonad -> OptionListBuilder
        end
      val optionListT : IOptionListMonad
    end
    module State = begin
      type IOptionStateMonad =
        interface
          abstract member
            Bind : StateM.State<'a option,'state> *
                   ('a -> StateM.State<'b option,'state>) ->
                     StateM.State<'b option,'state>
          abstract member
            Delay : f:(unit -> StateM.State<'a option,'state>) ->
                      StateM.State<'a option,'state>
          abstract member
            Let : 'a * ('a -> StateM.State<'b option,'state>) ->
                    StateM.State<'b option,'state>
          abstract member
            Lift : StateM.State<'a,'state> -> StateM.State<'a option,'state>
          abstract member Return : 'a -> StateM.State<'a option,'state>
          abstract member Zero : unit -> StateM.State<'a option,'state>
        end
      type OptionStateBuilder =
        class
          interface IOptionStateMonad
          new : stateM:StateM.IStateMonad -> OptionStateBuilder
        end
      val optionStateT : IOptionStateMonad
    end
  end

namespace FML
  module ReaderT = begin
    module List = begin
      type IReaderListTrans =
        interface
          abstract member
            Bind : ReaderM.Reader<'a list,'env> *
                   ('a -> ReaderM.Reader<'b list,'env>) ->
                     ReaderM.Reader<'b list,'env>
          abstract member
            Delay : f:(unit -> ReaderM.Reader<'a list,'env>) ->
                      ReaderM.Reader<'a list,'env>
          abstract member
            Let : 'a * ('a -> ReaderM.Reader<'b list,'env>) ->
                    ReaderM.Reader<'b list,'env>
          abstract member Lift : a:'a list -> ReaderM.Reader<'a list,'env>
          abstract member Return : 'a -> ReaderM.Reader<'a list,'env>
        end
      type ReaderListBuilder =
        class
          interface IReaderListTrans
          new : listM:ListM.IListMonad -> ReaderListBuilder
        end
      val readerListT : IReaderListTrans
    end
    module Option = begin
      type IReaderOptionTrans =
        interface
          abstract member
            Bind : ReaderM.Reader<'a option,'env> *
                   ('a -> ReaderM.Reader<'b option,'env>) ->
                     ReaderM.Reader<'b option,'env>
          abstract member
            Delay : f:(unit -> ReaderM.Reader<'a option,'env>) ->
                      ReaderM.Reader<'a option,'env>
          abstract member
            Let : 'a * ('a -> ReaderM.Reader<'b option,'env>) ->
                    ReaderM.Reader<'b option,'env>
          abstract member Lift : a:'a option -> ReaderM.Reader<'a option,'env>
          abstract member Return : 'a -> ReaderM.Reader<'a option,'env>
        end
      type ReaderOptionBuilder =
        class
          interface IReaderOptionTrans
          new : optionM:OptionM.IOptionMonad -> ReaderOptionBuilder
        end
      val readerOptionT : IReaderOptionTrans
    end
    module Error = begin
      type IReaderErrorTrans =
        interface
          abstract member
            Bind : ReaderM.Reader<ErrorM.Either<'l,'a>,'env> *
                   ('a -> ReaderM.Reader<ErrorM.Either<'l,'b>,'env>) ->
                     ReaderM.Reader<ErrorM.Either<'l,'b>,'env>
          abstract member
            Delay : f:(unit -> ReaderM.Reader<ErrorM.Either<'l,'a>,'env>) ->
                      ReaderM.Reader<ErrorM.Either<'l,'a>,'env>
          abstract member
            Let : 'a * ('a -> ReaderM.Reader<ErrorM.Either<'l,'b>,'env>) ->
                    ReaderM.Reader<ErrorM.Either<'l,'b>,'env>
          abstract member
            Return : 'a -> ReaderM.Reader<ErrorM.Either<'l,'a>,'env>
        end
      val lift : 'a -> ReaderM.Reader<'a,'b>
      val throwError : 'a -> ReaderM.Reader<ErrorM.Either<'a,'b>,'c>
      val catch :
        ReaderM.Reader<ErrorM.Either<'a,'b>,'c> ->
          ('a -> ReaderM.Reader<ErrorM.Either<'a,'b>,'c>) ->
            ReaderM.Reader<ErrorM.Either<'a,'b>,'c>
      type ReaderErrorBuilder =
        class
          interface IReaderErrorTrans
          new : errorM:ErrorM.IErrorMonad -> ReaderErrorBuilder
        end
      val readerErrorT : IReaderErrorTrans
    end
    module Writer = begin
      type IReaderWriterTrans<'s> =
        interface
          abstract member
            Bind : ReaderM.Reader<WriterM.Writer<'a,'s>,'env> *
                   ('a -> ReaderM.Reader<WriterM.Writer<'b,'s>,'env>) ->
                     ReaderM.Reader<WriterM.Writer<'b,'s>,'env>
          abstract member
            Delay : f:(unit -> ReaderM.Reader<WriterM.Writer<'a,'s>,'env>) ->
                      ReaderM.Reader<WriterM.Writer<'a,'s>,'env>
          abstract member
            Let : 'a * ('a -> ReaderM.Reader<WriterM.Writer<'b,'s>,'env>) ->
                    ReaderM.Reader<WriterM.Writer<'b,'s>,'env>
          abstract member
            Lift : a:WriterM.Writer<'a,'s> ->
                     ReaderM.Reader<WriterM.Writer<'a,'s>,'env>
          abstract member
            Return : 'a -> ReaderM.Reader<WriterM.Writer<'a,'s>,'env>
          abstract member
            Tell : 's -> ReaderM.Reader<WriterM.Writer<unit,'s>,'a>
        end
      type ReaderWriterBuilder<'s> =
        class
          interface IReaderWriterTrans<'s>
          new : writerM:WriterM.IWriterMonad<'s> -> ReaderWriterBuilder<'s>
        end
      val readerWriterT : Monoid.Monoid<'s> -> IReaderWriterTrans<'s>
    end
    module State = begin
      type IReaderStateTrans =
        interface
          abstract member
            Bind : ReaderM.Reader<StateM.State<'a,'s>,'env> *
                   ('a -> ReaderM.Reader<StateM.State<'b,'s>,'env>) ->
                     ReaderM.Reader<StateM.State<'b,'s>,'env>
          abstract member
            Delay : f:(unit -> ReaderM.Reader<StateM.State<'a,'s>,'env>) ->
                      ReaderM.Reader<StateM.State<'a,'s>,'env>
          abstract member
            Let : 'a * ('a -> ReaderM.Reader<StateM.State<'b,'s>,'env>) ->
                    ReaderM.Reader<StateM.State<'b,'s>,'env>
          abstract member
            Return : 'a -> ReaderM.Reader<StateM.State<'a,'s>,'env>
        end
      type ReaderStateBuilder =
        class
          interface IReaderStateTrans
          new : stateM:StateM.IStateMonad -> ReaderStateBuilder
        end
      val readerStateT : IReaderStateTrans
      val lift : 'a -> ReaderM.Reader<'a,'b>
      val get : unit -> ReaderM.Reader<StateM.State<'a,'a>,'b>
      val set : 'a -> ReaderM.Reader<StateM.State<unit,'a>,'b>
      val modify : ('a -> 'a) -> ReaderM.Reader<StateM.State<unit,'a>,'b>
    end
  end

namespace FML
  module StateT = begin
    module Option = begin
      type StateOptionT<'a,'state> =
        | StateOptionT of ('state -> ('a * 'state) option)
      val run : StateOptionT<'a,'b> -> 'b -> ('a * 'b) option
      type IStateOptionTrans =
        interface
          abstract member
            Bind : StateOptionT<'a,'state> * ('a -> StateOptionT<'b,'state>) ->
                     StateOptionT<'b,'state>
          abstract member
            Delay : f:(unit -> StateOptionT<'a,'state>) ->
                      StateOptionT<'a,'state>
          abstract member
            Let : 'a * ('a -> StateOptionT<'b,'state>) ->
                    StateOptionT<'b,'state>
          abstract member Lift : a:'a option -> StateOptionT<'a,'state>
          abstract member Return : 'a -> StateOptionT<'a,'state>
        end
      type StateOptionBuilder =
        class
          interface IStateOptionTrans
          new : optionM:OptionM.IOptionMonad -> StateOptionBuilder
        end
      val stateOptionT : IStateOptionTrans
      val lift : 'a option -> StateOptionT<'a,'b>
      val get : StateOptionT<'a,'a>
      val set : 'a -> StateOptionT<unit,'a>
      val modify : ('a -> 'a) -> StateOptionT<unit,'a>
    end
    module List = begin
      type StateListT<'a,'state> =
        | StateListT of ('state -> ('a * 'state) list)
      val run : StateListT<'a,'b> -> 'b -> ('a * 'b) list
      type IStateListTrans =
        interface
          abstract member
            Bind : StateListT<'a,'state> * ('a -> StateListT<'b,'state>) ->
                     StateListT<'b,'state>
          abstract member
            Delay : f:(unit -> StateListT<'a,'state>) -> StateListT<'a,'state>
          abstract member
            Let : 'a * ('a -> StateListT<'b,'state>) -> StateListT<'b,'state>
          abstract member Lift : a:'a list -> StateListT<'a,'state>
          abstract member Return : 'a -> StateListT<'a,'state>
        end
      type StateListBuilder =
        class
          interface IStateListTrans
          new : listM:ListM.IListMonad -> StateListBuilder
        end
      val stateListT : IStateListTrans
      val lift : 'a list -> StateListT<'a,'b>
      val get : StateListT<'a,'a>
      val set : 'a -> StateListT<unit,'a>
      val modify : ('a -> 'a) -> StateListT<unit,'a>
    end
    module Error = begin
      type StateErrorT<'l,'a,'state> =
        | StateErrorT of ('state -> ErrorM.Either<'l,('a * 'state)>)
      val run : StateErrorT<'a,'b,'c> -> 'c -> ErrorM.Either<'a,('b * 'c)>
      type IStateErrorTrans =
        interface
          abstract member
            Bind : StateErrorT<'l,'a,'state> * ('a -> StateErrorT<'l,'b,'state>) ->
                     StateErrorT<'l,'b,'state>
          abstract member
            Delay : f:(unit -> StateErrorT<'l,'a,'state>) ->
                      StateErrorT<'l,'a,'state>
          abstract member
            Let : 'a * ('a -> StateErrorT<'l,'b,'state>) ->
                    StateErrorT<'l,'b,'state>
          abstract member
            Lift : a:ErrorM.Either<'l,'a> -> StateErrorT<'l,'a,'state>
          abstract member Return : 'a -> StateErrorT<'l,'a,'state>
        end
      type StateErrorBuilder =
        class
          interface IStateErrorTrans
          new : errorM:ErrorM.IErrorMonad -> StateErrorBuilder
        end
      val stateErrorT : IStateErrorTrans
      val lift : ErrorM.Either<'a,'b> -> StateErrorT<'a,'b,'c>
      val get : StateErrorT<'a,'b,'b>
      val set : 'a -> StateErrorT<'b,unit,'a>
      val modify : ('a -> 'a) -> StateErrorT<'b,unit,'a>
    end
    module Reader = begin
      type StateReaderT<'env,'a,'state> =
        | StateReaderT of ('state -> ReaderM.Reader<('a * 'state),'env>)
      val run : StateReaderT<'a,'b,'c> -> 'c -> ReaderM.Reader<('b * 'c),'a>
      type IStateReaderTrans =
        interface
          abstract member
            Bind : StateReaderT<'env,'a,'state> *
                   ('a -> StateReaderT<'env,'b,'state>) ->
                     StateReaderT<'env,'b,'state>
          abstract member
            Delay : f:(unit -> StateReaderT<'env,'a,'state>) ->
                      StateReaderT<'env,'a,'state>
          abstract member
            Let : 'a * ('a -> StateReaderT<'env,'b,'state>) ->
                    StateReaderT<'env,'b,'state>
          abstract member
            Lift : a:ReaderM.Reader<'a,'env> -> StateReaderT<'env,'a,'state>
          abstract member Return : 'a -> StateReaderT<'env,'a,'state>
        end
      type StateReaderBuilder =
        class
          interface IStateReaderTrans
          new : readerM:ReaderM.IReaderMonad -> StateReaderBuilder
        end
      val stateReaderT : IStateReaderTrans
      val lift : ReaderM.Reader<'a,'b> -> StateReaderT<'b,'a,'c>
    end
    module Writer = begin
      type StateWriterT<'s,'a,'state> =
        | StateWriterT of ('state -> WriterM.Writer<('a * 'state),'s>)
      val run : StateWriterT<'a,'b,'c> -> 'c -> WriterM.Writer<('b * 'c),'a>
      type IStateWriterTrans<'s> =
        interface
          abstract member
            Bind : StateWriterT<'s,'a,'state> *
                   ('a -> StateWriterT<'s,'b,'state>) ->
                     StateWriterT<'s,'b,'state>
          abstract member
            Delay : f:(unit -> StateWriterT<'s,'a,'state>) ->
                      StateWriterT<'s,'a,'state>
          abstract member
            Let : 'a * ('a -> StateWriterT<'s,'b,'state>) ->
                    StateWriterT<'s,'b,'state>
          abstract member
            Lift : a:WriterM.Writer<'a,'s> -> StateWriterT<'s,'a,'state>
          abstract member Return : 'a -> StateWriterT<'s,'a,'state>
        end
      type StateWriterBuilder<'s> =
        class
          interface IStateWriterTrans<'s>
          new : writerM:WriterM.IWriterMonad<'s> -> StateWriterBuilder<'s>
        end
      val stateWriterT : Monoid.Monoid<'s> -> IStateWriterTrans<'s>
      val lift :
        IStateWriterTrans<'s> -> WriterM.Writer<'a,'s> -> StateWriterT<'s,'a,'b>
    end
  end

namespace FML
  module WriterT = begin
    module Option = begin
      type WriterOptionT<'a,'s> = | WriterOptionT of ('a * 's) option
      val run : WriterOptionT<'a,'b> -> ('a * 'b) option
      type IWriterOptionTrans<'s> =
        interface
          abstract member
            Bind : WriterOptionT<'a,'s> * ('a -> WriterOptionT<'b,'s>) ->
                     WriterOptionT<'b,'s>
          abstract member
            Delay : f:(unit -> WriterOptionT<'a,'s>) -> WriterOptionT<'a,'s>
          abstract member
            Let : 'a * ('a -> WriterOptionT<'b,'s>) -> WriterOptionT<'b,'s>
          abstract member Lift : a:'a option -> WriterOptionT<'a,'s>
          abstract member Return : 'a -> WriterOptionT<'a,'s>
        end
      type WriterOptionBuilder<'s> =
        class
          interface IWriterOptionTrans<'s>
          new : optionM:OptionM.IOptionMonad * monoid:Monoid.Monoid<'s> ->
                  WriterOptionBuilder<'s>
        end
      val WriterOptionT : Monoid.Monoid<'s> -> IWriterOptionTrans<'s>
    end
    module List = begin
      type WriterListT<'a,'s> = | WriterListT of ('a * 's) list
      val run : WriterListT<'a,'b> -> ('a * 'b) list
      type IWriterListTrans<'s> =
        interface
          abstract member
            Bind : WriterListT<'a,'s> * ('a -> WriterListT<'b,'s>) ->
                     WriterListT<'b,'s>
          abstract member
            Delay : f:(unit -> WriterListT<'a,'s>) -> WriterListT<'a,'s>
          abstract member
            Let : 'a * ('a -> WriterListT<'b,'s>) -> WriterListT<'b,'s>
          abstract member Lift : a:'a list -> WriterListT<'a,'s>
          abstract member Return : 'a -> WriterListT<'a,'s>
        end
      type WriterListBuilder<'s> =
        class
          interface IWriterListTrans<'s>
          new : listM:ListM.IListMonad * monoid:Monoid.Monoid<'s> ->
                  WriterListBuilder<'s>
        end
      val WriterListT : Monoid.Monoid<'s> -> IWriterListTrans<'s>
    end
    module Error = begin
      type WriterErrorT<'l,'r,'s> =
        | WriterErrorT of ErrorM.Either<'l,('r * 's)>
      val run : WriterErrorT<'a,'b,'c> -> ErrorM.Either<'a,('b * 'c)>
      type IWriterErrorTrans<'s> =
        interface
          abstract member
            Bind : WriterErrorT<'l,'a,'s> * ('a -> WriterErrorT<'l,'b,'s>) ->
                     WriterErrorT<'l,'b,'s>
          abstract member
            Delay : f:(unit -> WriterErrorT<'l,'a,'s>) -> WriterErrorT<'l,'a,'s>
          abstract member
            Let : 'a * ('a -> WriterErrorT<'l,'b,'s>) -> WriterErrorT<'l,'b,'s>
          abstract member
            Lift : a:ErrorM.Either<'l,'r> -> WriterErrorT<'l,'r,'s>
          abstract member Return : 'a -> WriterErrorT<'l,'a,'s>
        end
      type WriterErrorBuilder<'s> =
        class
          interface IWriterErrorTrans<'s>
          new : errorM:ErrorM.IErrorMonad * monoid:Monoid.Monoid<'s> ->
                  WriterErrorBuilder<'s>
        end
      val WriterErrorT : Monoid.Monoid<'s> -> IWriterErrorTrans<'s>
    end
    module Reader = begin
      type WriterReaderT<'r,'s,'env> =
        | WriterReaderT of ReaderM.Reader<('r * 's),'env>
      val run : WriterReaderT<'a,'b,'c> -> ReaderM.Reader<('a * 'b),'c>
      type IWriterReaderTrans<'s> =
        interface
          abstract member
            Bind : WriterReaderT<'a,'s,'env> * ('a -> WriterReaderT<'b,'s,'env>) ->
                     WriterReaderT<'b,'s,'env>
          abstract member
            Delay : f:(unit -> WriterReaderT<'a,'s,'env>) ->
                      WriterReaderT<'a,'s,'env>
          abstract member
            Let : 'a * ('a -> WriterReaderT<'b,'s,'env>) ->
                    WriterReaderT<'b,'s,'env>
          abstract member
            Lift : a:ReaderM.Reader<'a,'env> -> WriterReaderT<'a,'s,'env>
          abstract member Return : 'a -> WriterReaderT<'a,'s,'env>
        end
      type WriterReaderBuilder<'s> =
        class
          interface IWriterReaderTrans<'s>
          new : readerM:ReaderM.IReaderMonad * monoid:Monoid.Monoid<'s> ->
                  WriterReaderBuilder<'s>
        end
      val WriterReaderT : Monoid.Monoid<'s> -> IWriterReaderTrans<'s>
    end
  end

